<template>
<!-- 文件夹名字错了改了报错 -->
  <swiper :options="swiperOption" ref="mySwiper" v-if="Img.length>0">
    <swiper-slide v-for="(item,index) in Img" :key="index">
      <img :src="item">
    </swiper-slide>
    <div class="swiper-pagination" slot="pagination" v-if="Img.length>1"></div>
  </swiper>
</template>
<script>
export default {
  name: "Silder",
  data() {
    return {
      // Img:[],
      swiperOption: {
        pagination: {
          el: ".swiper-pagination"
        },
        loop:true,
        // autoplay:true
      }
    };
  },
  props: {
    Img: {
      type: Array,
      default: function() {
        return [];
      }    
    }
  },
  components: {}
};
</script>
<style scoped>
</style>
